import time

import  pytest,os,sys
sys.path.append(os.getcwd())

from utils.read_dataUtils import *
from utils.initDriver import init_driver
from service.service_regForm import ServiceRegForm


class TestRegForm(object):
    def setup_class(self):
        self.base_url=readConfig("config/webConfig.yaml")["base_url"]

    def teardown_class(self):
        pass

    def setup(self):
        self.driver=init_driver()
        self.service_regForm=ServiceRegForm(self.driver,self.base_url)


    def teardown(self):
        time.sleep(5)
        self.driver.quit()

    @pytest.mark.parametrize("d",read_cesiData("data/regForm.yaml","test_regForm_001"))
    def test_regForm_001(self,d):
        assert self.service_regForm.service_regForm_001(d)
